{{ if and .Values.images.registry.imagePullSecret.name .Values.images.registry.imagePullSecret.create -}}
apiVersion: v1
kind: Secret
metadata:
  name: {{ .Values.images.registry.imagePullSecret.name }}
  namespace: {{ .Release.Namespace }}
type: kubernetes.io/dockerconfigjson
data:
  .dockerconfigjson: {{ template "imagePullSecret" . }}
{{- end }}